JavaScript

buttonList.insertButtons Method

Syntax

buttonListObj.insertButtons(value, buttons)

Arguments

valuestring

The 'value' property of the button where the new buttons should be inserted.

buttonsJSON array

An array of JSON objects that define the buttons to add. The object defining the button has the following properties:

valueany

The value of the button.

hideboolean

If true then the button will not appear in the list. The default is false.

disabledboolean

If true then the button will not appear in the list. The default is false.

htmlstring

The HTML to put in the button.

iconstring

The icon to put in the button. See A5.u.icon.

hoverIconstring

The icon to put in the button when the user hovers over it. See A5.u.icon.

pressedIconstring

The icon to put in the button when it is pressed. See A5.u.icon.

disabledIconstring

The icon to put in the button when it is disabled. See A5.u.icon.

disabledSelectedIconstring

The icon to put in the button when it is disabled and selected. See A5.u.icon.

tipstring

The TITLE attribute to put in the button that will appear as a tool tip when the user hovers over the button.

Description

Inserts new buttons into a Button List Control.

Example

var buttonListObj = {dialog.object}.getControl('BUTTONLIST_1');

if (buttonListObj) {
    var _new = [
        {html: 'New Button 1', value: 'nb1', tip: 'Help for new button 1'},
        {html: 'New Button 2', value: 'nb2', tip: 'Help for new button 2'},
    ];

    buttonListObj.insertButtons('b2', _new);
}